package com.kevin.controller.action;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import lombok.extern.slf4j.Slf4j;

@Controller
@Slf4j
public class IndexAction {

    @RequestMapping("/")
    public ModelAndView index() {
        ModelAndView mav = new ModelAndView("index");
        log.warn("index log!");
        return mav;
    }

    @RequestMapping("/show")
    public ModelAndView show() {
        ModelAndView mav = new ModelAndView("show");
        log.warn("test log!");
        return mav;
    }

    @RequestMapping("/zeroException")
    public int zeroException() {
        return 100 / 0;
    }
}
